Problem: $f(x) = \begin{cases} \dfrac{ x + 2 }{ ( x + 2 )( x - 4 ) } & \text{if } x \neq 8 \\ 2 & \text{if } x = 8 \end{cases}$ What is the domain of the real-valued function $f(x)$ ?
$f(x)$ is a piecewise function, so we need to examine where each piece is undefined. The first piecewise definition of $f(x)$ $\frac{ x + 2 }{ ( x + 2 )( x - 4 ) }$ , is undefined where the denominator is zero. The denominator, $(x + 2)(x - 4)$ , is zero when $x = -2$ or $x = 4$ So the first piecewise definition of $f(x)$ is defined when $x \neq -2$ and $x \neq 4$ . The first piecewise definition applies when $x = -2$ and $x = 4$ , so these restrictions are relevant to the domain of $f(x)$ The second piecewise definition of $f(x)$ $2$ , is a simple horizontal line function and so has no holes or gaps to worry about, so it is defined everywhere. So the first piecewise definition is defined when $x \neq -2$ and $x \neq 4$ and applies when $x \neq 8$ ; the second piecewise definition is defined always and applies when $x = 8$ . Putting the restrictions of these two together, the only places where a definition applies and is undefined are at $x = -2$ and $x = 4$ . So the restriction on the domain of $f(x)$ is that $x \neq -2$ and $x \neq 4$ Expressing this mathematically, the domain is $\{ \, x \in \RR \mid x \neq-2, \,x \neq4\, \}$.